package com.meixiang.activity.homes.staging;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.meixiang.R;
import com.meixiang.main.BaseActivity;
import com.meixiang.util.AbStrUtil;
import com.meixiang.view.TitleView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * @author yinsujun  Created at 2016/5/5 18:19
 */
public class StagingDetailActivity extends BaseActivity {
    @Bind(R.id.title)
    TitleView title;
    @Bind(R.id.staging_detail_tv_title)
    TextView tvTitle;
    @Bind(R.id.staging_detail_tv_repayment_time)
    TextView tvRepaymentTime;
    @Bind(R.id.staging_detail_tv_details)
    TextView tvDetails;
    @Bind(R.id.staging_detail_tv_total_money)
    TextView tvTotalMoney;
    @Bind(R.id.staging_detail_relative)
    RelativeLayout stagingDetailRelative;
    @Bind(R.id.staging_detail_tv_shopping_name)
    TextView tvShoppingName;
    @Bind(R.id.staging_detail_tv_payment_method)
    TextView tvPaymentMethod;
    @Bind(R.id.staging_detail_tv_order_money)
    TextView tvOrderMoney;
    @Bind(R.id.staging_detail_tv_deal_time)
    TextView tvDealTime;
    @Bind(R.id.staging_detail_bt_confirm)
    Button btConfirm;
    private String type;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_staging_detail);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        setTitle("分期详情");
        type=getIntent().getStringExtra("type");
        if((!AbStrUtil.isEmpty(type))){
            //1美分期订单
            if(type.equals("1")){
                btConfirm.setVisibility(View.VISIBLE);
            }
        }else{
            btConfirm.setVisibility(View.GONE);
        }

    }

    @Override
    protected void initView() {

    }

    @Override
    protected void setData() {

    }
    @OnClick({R.id.staging_detail_relative,R.id.staging_detail_bt_confirm})
    void click(View view){
        Intent intent=new Intent();
        if(view.equals(stagingDetailRelative)){
            intent.setClass(context,CheckStagingDetailActivity.class);
        }else if(view.equals(btConfirm)){
            intent.setClass(context,SettleStagingActivity.class);
        }
        startActivity(intent);
    }

    @Override
    public void onClick(View v) {

    }
}
